<?php
class CakePHP_Element_Password extends Base_Element_Element
{
	public function __construct($definition){
		$this->setDefinition($definition);
		$this->loadTemplate();
		
		$this->render();
	}

	public function render(){

		$docs = $this->buildPhpDocs();
		$name = strtolower($this->getDefinition('name'));
		$data = '$' .$name. ' = new CakePHP_Form_Password(\''.$name.'\');' . PHP_EOL
				.'	$' . $name . '->setLabel(\''.$this->getDefinition('label').'\')'. PHP_EOL;

		$content = sprintf(self::$_tpl, $docs, $this->getDefinition('name'), $data, $name);
		
		$this->_data = $content;
	}
}
?>